package com.ply.flashsalessystem.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ply.flashsalessystem.entity.pojo.OrderForGoodsDetaile;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ply.flashsalessystem.entity.result.Result;
import com.ply.flashsalessystem.entity.vo.OrderForGoodsDetaileVo;
import com.ply.flashsalessystem.entity.wrapper.OrderDetailsWrapper;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author XiaoPan
 * @since 2022-03-23
 */
public interface OrderForGoodsDetaileService extends IService<OrderForGoodsDetaile> {

    /**
     * 查询
     */
    /**
     * 分拣查询 按照降序 排列
     * <p>
     * 按照时间 查询的
     *
     * @param current
     * @param limit
     * @param nums
     * @return
     */
    Page<OrderForGoodsDetaile> queryNumsForSort(Integer current,
                                                Integer limit,
                                                Integer goodId,
                                                double nums);

    /**
     * 分页条件 查询 所有
     *
     * @param current
     * @param limit
     * @param orderDetailsWrapper 条件
     * @return
     */
    Page<OrderForGoodsDetaile> queryAll(Integer current,
                                        Integer limit,
                                        OrderDetailsWrapper orderDetailsWrapper);

    /**
     * 修改
     *
     * @param org_d_id
     * @param status
     * @return
     */
    boolean updateOrderForGoodsDetailsStatus(Integer org_d_id,
                                             Integer status);

    Result getTodayOrder(Integer current,Integer limit);


    /**
     * 根据 订单 id 查询 订单详情
     * @param ofgId
     * @return
     */
    Page<OrderForGoodsDetaileVo> getOrderDetailsByOrderId(Integer current,Integer limit,Integer ofgId);
}
